package com.onenine.app.model;

import android.graphics.drawable.Drawable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

public class BarrageItem implements MultiItemEntity {

    private int sex;
    private String cityName;
    private String photo;
    private String content;
    private String nickName;
    private String userId;
    private int barrageType;
    private String voiceUrl;
    private String pictureUrl;
    private boolean isTouchClick;
    private String pkId;
    private Drawable avatarDrawable;

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getCityName() {
        return cityName == null ? "" : cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getPhoto() {
        return photo == null ? "" : photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getContent() {
        return content == null ? "" : content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getNickName() {
        return nickName == null ? "" : nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getUserId() {
        return userId == null ? "" : userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getBarrageType() {
        return barrageType;
    }

    public void setBarrageType(int barrageType) {
        this.barrageType = barrageType;
    }

    public String getVoiceUrl() {
        return voiceUrl == null ? "" : voiceUrl;
    }

    public void setVoiceUrl(String voiceUrl) {
        this.voiceUrl = voiceUrl;
    }

    public String getPictureUrl() {
        return pictureUrl == null ? "" : pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public String getPkId() {
        return pkId == null ? "" : pkId;
    }

    public void setPkId(String pkId) {
        this.pkId = pkId;
    }

    public boolean isTouchClick() {
        return isTouchClick;
    }

    public void setTouchClick(boolean touchClick) {
        isTouchClick = touchClick;
    }

    public Drawable getAvatarDrawable() {
        return avatarDrawable;
    }

    public void setAvatarDrawable(Drawable avatarDrawable) {
        this.avatarDrawable = avatarDrawable;
    }

    /**
     * 获取标标识码
     *
     * @return
     */
    public int getIdentificationCode() {
        return sex + barrageType + nickName.length() + content.length();
    }

    @Override
    public int getItemType() {
        return barrageType;
    }

}
